package com.example.steveaoblogdemo.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.FillPatternType;


/**
 * (User)表实体类
 *
 * @author makejava
 * @since 2023-07-18 18:16:29
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuppressWarnings("serial")
@TableName("user")
//取消默认填充色
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL,fillForegroundColor = 10)
public class User {
    //用户ID(自增)
    @TableId(type = IdType.AUTO)
    @ExcelProperty("用户ID")
    @ColumnWidth(20)
    private Integer id;
    //用户名
    @ExcelProperty("用户名")
    @ColumnWidth(20)
    private String username;
    //用户昵称
    @ExcelProperty("用户昵称")
    @ColumnWidth(20)
    private String nickname;
    //用户密码
    @ExcelIgnore
    private String password;
    //用户头像
    @ExcelIgnore
    private String avatar;
    //用户性别
    @ExcelProperty("用户性别")
    @ColumnWidth(20)
    private String sex;
    //用户邮箱
    @ExcelProperty("用户邮箱")
    @ColumnWidth(20)
    private String email;
    //保存Token
    @ExcelIgnore
    private String token;
    //个人简介
    @ExcelIgnore
    private String resume;
    //用户状态
    @ExcelProperty("用户状态(0存在，1删除)")
    @ColumnWidth(20)
    private Integer status;
    //盐值加密
    @ExcelIgnore
    private Integer salt;
    //点赞状态
    @ExcelIgnore
    private Integer recommend;
    //用户权限(0普通用户，1管理员)
    @ExcelProperty("用户权限(0普通用户，1管理员)")
    @ColumnWidth(20)
    private Integer role;
}

